const { Sequelize } = require("sequelize");

const seq = new Sequelize(
  process.env.MYSQL_DB,
  process.env.MYSQL_USER,
  process.env.MYSQL_PWD,
  {
    host: process.env.MYSQL_HOST,
    port: process.env.MYSQL_PORT,
    dialect: "mysql",
    timezone: "+08:00", // 设置为东八区时区
  }
);

// seq.authenticate().then(() => {
//   console.log("数据库连接成功");
// });

module.exports = seq;
